package fr.cephb.locustree.loaders;

import java.util.HashMap;
import java.util.Map;

import fr.cephb.locustree.MappedObject;

public class UCSCKnownGeneLoader
	extends AbstractLTStreamLoader
	{
	@Override
	protected boolean make(String[] token)
		{
		this.chromosome=token[1];
		this.mappedObject=new MappedObject(token[0], token[10], Integer.parseInt(token[3]), Integer.parseInt(token[4]));
		Map<String,Object> json= new HashMap<String,Object>();
		json.put("strand", token[2]);
		json.put("exonStarts", listOfInt(token[8]));
		json.put("exonEnds", listOfInt(token[9]));
		this.mappedObject.setJSON(json);
		this.keywords.add(this.mappedObject.getName());
		return true;
		}
	}
